<html>
    <head>
        <meta charset="utf-8">
        <title>商户端-订单管理</title>
        <include file="Public:common_file" />
        <link rel="stylesheet" type="text/css" href="/Public/css/seller.css">
        <style type="text/css">
            #code{
            	width:90%; margin:50px 5%; height:50px; font-size:20px;
            }
            #btn{
            	width:90%; margin:0px 5%;
            }
        </style>
    </head>
    <body>
    	<div class="head">
            <a href="{:U('Index/index')}"><div class="left">&nbsp;<i class="fa fa-chevron-left" aria-hidden="true"></i>&nbsp;</div></a>
            <div class="center">验证团购</div>
            <div class="right"></div>
        </div>
        <div class="clear"></div>



    	<div class="body">
	       <input type="text" class="form-control" id="code" placeholder="请输入验证码" onchange="check_code()"  onkeyup="check_code()" maxlength="14" >
	       <button id="btn" class="btn btn-success" onclick="yz()">验证</button>
    	</div>


		<div id="myModal" class="modal fade" tabindex="-1" role="dialog">
			<div class="modal-dialog" role="document">
			<div class="modal-content" style="margin-top: 100px;">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">验证</h4>
				</div>
				<div class="modal-body">
					<p>团购名称：hello kitty 健身房单次健身 无时间限制</p>
					<p>数量：1</p>
					<p>购买价格：155元</p>
					<p>结算价格：120元</p>
					
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" onclick="hx()">确定核销</button>
				</div>
			</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
    </body>
    <script type="text/javascript">
        imgload();

        function hx(){
			if (confirm('核销后无法撤销\n资金会转入您的账户中\n确认核销？')) {
				$('#myModal').modal('hide');
				hover_in();
	        	setTimeout('hover_out();alert("验证成功");$("#code").val("");',2000);
			}
        }

        function check_code(){

        	var value = $('#code').val();
        	value = value.replace(/[^\d]/g,'');
        	value = value.replace(/\D/g, '').replace(/....(?!$)/g, '$& ');
        	$('#code').val(value);
        }

        function yz(){
        	hover_in();
        	$('#myModal').modal();
        	hover_out();
        }
    </script>
</html>